import random
lottery = random.randint(0,999)
guess = eval(input("请输入彩票数字："))
print("彩票数：",lottery)

lotteryDigit1,lotteryDigit2 = lottery % 10,lottery // 10
lotteryDigit2,lotteryDigit3 = lotteryDigit2 % 10,lotteryDigit2 // 10

guessDigit1,guessDigit2 = guess % 10,guess // 10
guessDigit2,guessDigit3 = guessDigit2 % 10,guessDigit2 // 10

if guess == lottery:
    print("你获得了$10,000")
elif (guessDigit1==lotteryDigit1 and guessDigit2 == lotteryDigit3 or guessDigit3 == lotteryDigit2 ) or \
        (guessDigit1==lotteryDigit2 and guessDigit2 == lotteryDigit3 and guessDigit3==lotteryDigit1) or \
        (guessDigit1==lotteryDigit2 and guessDigit2 == lotteryDigit1 and guessDigit3==lotteryDigit3) or \
        (guessDigit1==lotteryDigit3 and guessDigit2 == lotteryDigit1 and guessDigit3==lotteryDigit2) or \
        (guessDigit1==lotteryDigit3 and guessDigit2 == lotteryDigit2 and guessDigit3==lotteryDigit1) :
    print("你获得了$3,000")
elif guessDigit1==lotteryDigit1 or \
        guessDigit1==lotteryDigit2 or \
        guessDigit1==lotteryDigit3 or \
        guessDigit2==lotteryDigit1 or \
        guessDigit2==lotteryDigit2 or \
        guessDigit2==lotteryDigit3 or \
        guessDigit3==lotteryDigit1 or \
        guessDigit3==lotteryDigit2 or \
        guessDigit3==lotteryDigit3 :
    print("你获得了$1,000")
else:
    print("对不起，你没有获奖。")